home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / gcc / libmat.lha / src / mconstmult1.cc < prev    next >
C/C++ Source or Header  |  1980-01-01  |  228b  |  13 lines

  1. //                MATRIX LIB
  2. //            TOMMY JOHANSSON 1995
  3.  
  4. #include "matrix.h"
  5. Matrix operator * (float x,const Matrix& A)
  6. {
  7.     int i,j;
  8.     Matrix C(A.m,A.n);
  9.     for(i=1;i<=A.m;i++)
  10.         for(j=1;j<=A.n;j++)
  11.             C.koff[i][j]=x*A.koff[i][j];
  12.     return(C);
  13. }